package com.walker.dicegame;

import java.util.Random;

import com.joew.framework.Graphics.ImageFormat;

public class Dice {
	private int startx = 200;
	private int starty = 200;
	private int width = 100;
	Random r = new Random();
	private int start_val = r.nextInt(6)+1;
	
	public void update(){
		start_val = r.nextInt(6)+1;
		System.out.print("Current die val: ");
		System.out.println(start_val);
	}
	
	public int get_val(){
		return start_val;
	}

	public int getx(){
		return startx;
	}
	
	public int gety(){
		return starty;
	}
	
	public void setx(int pos){
		if (pos != 0)
			startx = pos-50;
	}
	
	public void sety(int pos){
		if (pos != 0)
			starty = pos-50;
	}
	
	public boolean contains(int x, int y){
		if (x > startx && x <startx+width){
			if (y > starty && y < starty+width)
				return true;		
		}
		return false;
	}

}
